package org.budo.weixin.work.message.taskcard;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
@AllArgsConstructor
public class TaskCardButton {
    private String key;

    private String name;

    private String replace_name;

    private String color;

    private Boolean is_bold;

    public TaskCardButton() {

    }

    public TaskCardButton(String color, Boolean isBold) {
        key = "pass";
        name = "查看";
        replace_name = "已处理";
        this.color = color;
        this.is_bold = isBold;
    }

    public TaskCardButton(Boolean pass, String color, Boolean isBold) {
        if (pass) {
            key = "pass";
            name = "通过";
            replace_name = "已通过";
        } else {
            key = "reject";
            name = "驳回";
            replace_name = "已驳回";
        }
        this.color = color;
        this.is_bold = isBold;
    }
}
